package org.senseframework.support.orm.hbase.query;

import org.apache.hadoop.hbase.client.Scan;
import org.apache.hadoop.hbase.filter.Filter;
import org.senseframework.support.orm.hbase.utils.HBaseEntityUtils;

import java.util.List;

/**
 * @author wangqian
 * @date 18/4/11 下午11:01
 */
public class HBaseQuery {


    protected Scan scan;
    protected List<Filter> filter;

    protected String rowKey;
    protected List<String> rowKeys;

    private Integer page = 1;
    private Integer size = 10;

    public List<Filter> getFilter() {
        return filter;
    }

    public void setFilter(List<Filter> filter) {
        this.filter = filter;
    }

    public List<String> getRowKeys() {
        return rowKeys;
    }

    public void setRowKeys(List<String> rowKeys) {
        this.rowKeys = rowKeys;
    }

    public Integer getPage() {
        return page;
    }

    public void setPage(Integer page) {
        this.page = page;
    }

    public Integer getSize() {
        return size;
    }

    public void setSize(Integer size) {
        this.size = size;
    }

    public String getRowKey() {
        return rowKey;
    }

    public void setRowKey(String rowKey) {
        this.rowKey = rowKey;
    }

    public Scan getScan() {
        return scan;
    }

    public void setScan(Scan scan) {
        this.scan = scan;
    }

    private Class clazz = null;

    public HBaseQuery(Class clazz) {
        this.scan = new Scan();
        if (clazz == null) {
            throw new RuntimeException("class is null");
        }
        HBaseEntityUtils.initial(clazz);
        this.clazz = clazz;
    }


    public Class getClazz() {
        return clazz;
    }
}
